package com.tanhua.dubbo.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.domain.db.SoulOptions;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface SoulOptionsMapper extends BaseMapper<SoulOptions> {


    @Select(" SELECT  id,question_id,option_id,score,`option`  FROM tb_soul_options     WHERE question_id = #{questionId}")
    List<SoulOptions> findOption(String questionId);

    @Select("SELECT score FROM tb_soul_options     WHERE question_id = #{questionId} AND option_id = #{optionId}")
    Integer findScore(String questionId, String optionId);
}
